﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class InputManager : MonoBehaviour
{
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            
        }

        if (Input.GetKeyDown(KeyCode.Space))
        {
            
        }

        if (Input.GetKeyDown(KeyCode.Alpha1))
        {
            Time.timeScale = 1f;

            //string sceneName = "Scene_Level_" + 1;
            //LoadingPanel.Instance.LoadScene(sceneName);
            //SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
        }

        if (Input.GetKeyDown(KeyCode.Alpha2))
        {
            SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
        }

        if (Input.GetKeyDown(KeyCode.Alpha3))
        {
            SceneManager.CreateScene("Scene1");
        }

        if (Input.GetKeyDown(KeyCode.Alpha4))
        {
            SceneManager.CreateScene("Scene3");
        }

        if (Input.GetKeyDown(KeyCode.Alpha5))
        {
            SceneManager.UnloadScene("Scene1");
        }

        if (Input.GetKeyDown(KeyCode.Alpha6))
        {
            SceneManager.UnloadScene("Scene2");
        }
        

    }
}
